<template>
    <div>
        <input type="text" v-model="loginInfo.acc">
    </div>
    <div>
        <input type="text" v-model="loginInfo.pwd">
    </div>
    <button @click="login">登录</button>
</template>

<script setup>
import { reactive } from 'vue';
import { useRouter } from 'vue-router';

const router = useRouter()


const loginInfo = reactive({
    acc: '',
    pwd: '',
})

const login = e => {
    sessionStorage.setItem('info',JSON.stringify(loginInfo))
    router.replace({ path: '/home' })
}
</script>

<style lang="scss" scoped></style>